import unittest
from openpyxl import load_workbook

class excel():

    def __init__(self, path, sheetname):
        self.path = load_workbook(path)
        self.sheetname = self.path[sheetname]

    def getdatafromexcel(self):
        datalist = []
        for line in self.sheetname:
            datalist2 = []
            datalist2.append(line[0].value)
            datalist2.append(line[2].value)
            datalist2.append(line[3].value)
            datalist2.append(line[9].value)
            datalist2.append(line[11].value)
            datalist2.append(line[12].value)
            datalist.append(datalist2)
        datalist.pop(0)
        return datalist

if __name__ == '__main__':
    path = r'C:\Users\86155\PycharmProjects\untitled\Day_2211A\Unit_04\login.xlsx'
    sheetname = 'login'
    dy = excel(path, sheetname)
    data = dy.getdatafromexcel()
    print(data)
